Don't set unsigned ints to -1. (#315481, Kjartan Maraas)
authorMatthias Clasen <mclasen@redhat.com>
Fri, 9 Sep 2005 17:48:00 +0000 (17:48 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 9 Sep 2005 17:48:00 +0000 (17:48 +0000)
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set
unsigned ints to -1.  (#315481, Kjartan Maraas)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkwindow.c

index b45ff6fcb61174958a65dbeaafd955c993c973e0..59a217590ab53d138ae397dfe98cc65cd123673e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-09-09  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set
+       unsigned ints to -1.  (#315481, Kjartan Maraas)
+
        * gtk/gtkcalendar.c (gtk_calendar_init): first_weekday is relative
        to week_1stday, not to Sunday. Gotta love the ISO 14652 guys...
        (#314473, Stanislav Brabec)
index b45ff6fcb61174958a65dbeaafd955c993c973e0..59a217590ab53d138ae397dfe98cc65cd123673e 100644 (file)
@@ -1,5 +1,8 @@
 2005-09-09  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set
+       unsigned ints to -1.  (#315481, Kjartan Maraas)
+
        * gtk/gtkcalendar.c (gtk_calendar_init): first_weekday is relative
        to week_1stday, not to Sunday. Gotta love the ISO 14652 guys...
        (#314473, Stanislav Brabec)
index 904c12c09ea8ee4a3c08365683ac5bd23b6f6496..572565625b9b335f0ccc07c3afd489a611d84f1c 100644 (file)
@@ -7339,17 +7339,13 @@ gtk_window_parse_geometry (GtkWindow   *window,
   
   result = gtk_XParseGeometry (geometry, &x, &y, &w, &h);
 
-  if ((result & WidthValue) == 0 ||
-      w < 0)
-    w = -1;
-  if ((result & HeightValue) == 0 ||
-      h < 0)
-    h = -1;
-
   size_set = FALSE;
   if ((result & WidthValue) || (result & HeightValue))
     {
-      gtk_window_set_default_size_internal (window, TRUE, w, TRUE, h, TRUE);
+      gtk_window_set_default_size_internal (window, 
+                                           TRUE, result & WidthValue ? w : -1,
+                                           TRUE, result & HeightValue ? h : -1, 
+                                           TRUE);
       size_set = TRUE;
     }